import sys
sys.path.insert(0, './')

import os
import argparse
import logging
from pprint import pformat

from reader.Reader_landmark_config import Config

from utils.Engine import *

def parse_args():
    parser = argparse.ArgumentParser(description='Trainging Template')
    # general
    parser.add_argument('--cfg', default="cfg/resnet18_pts17.yml", type=str)
    parser.add_argument('--train_flag', default=True, type=bool)

    args = parser.parse_args()
    return args


if __name__ == "__main__":
    args = parse_args()
    config = Config(args).get_config()
    logging.info('Config\n\n%s\n' % pformat(config))

    engine = trainEngine(config)
    engine.train()